package java_9_12;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/*
学士后月考是每月的第一个周六，输出今年的月考时间
*/
public class Test_9 {
    public static void main(String[] args) {
        Calendar c=Calendar.getInstance();
        c.set(2021,0,1);
        SimpleDateFormat s=new SimpleDateFormat("MM月dd日");
        while (c.get(Calendar.YEAR)==2021){
            c.set(2021,c.get(Calendar.MONTH),1);
            int week=0;
            while (week<1){
                if (c.get(Calendar.DAY_OF_WEEK)==7){
                    week++;
                    System.out.println(s.format(c.getTime()));
                }
                c.add(Calendar.DAY_OF_MONTH,1);
            }
            c.add(Calendar.MONTH,1);
            System.out.println(c.get(Calendar.MONTH));
            System.out.println(c.get(Calendar.YEAR));
        }

    }
}
